<#macro placeTree filepath=''>
    <@_templateList path='/include'+filepath orderField='createDate'>
        <#list list as a>
            <#if !a.directory><@t.merge 'paths' filepath+'/'+a.fileName/></#if>
        </#list>
        <@_sysLock userId=admin.id itemType='placeTemplate' itemIds=t.paths><#assign lockMap=map!/></@_sysLock>
        <#if lockMap?has_content>
            <#list lockMap as k,lock>
                <#if lock.userId?has_content><@t.merge 'userIds' lock.userId/></#if>
            </#list>
        </#if>
        <@_sysUser ids=t.userIds><#assign userMap=map!/></@_sysUser>
        <#list list as a>
            <li>
                <#local path=filepath+'/'+a.fileName>
                <#if a.directory>
                    <a href="placeTemplate/directory.html?path=${(path?url)!}" target="ajax" rel="cmsTemplatePlace">${a.fileName}</a>
                    <ul><@placeTree path/></ul>
                <#else>
                    <a href="placeTemplate/content.html?path=${(path?url)!}" <#if lockMap[path]?has_content><#assign lockUser=(userMap[lockMap[path].userId?string].nickName)!''/>title="<@t.page 'lock.message' lockUser/> ${lockMap[path].createDate}"</#if> target="ajax" rel="cmsTemplatePlace">
                        <@_placeMetadata path=path>
                            <#if lockMap[path]?has_content><i class="icon-lock icon-large"></i> </#if><#if 0 lt ((object.size)!0)><@t.page 'place_data.place'/>:</#if>
                            ${(object.alias)!a.fileName}
                        </@_placeMetadata>
                    </a>
                </#if>
            </li>
        <#else>
            <li><a><@t.page 'empty_directory'/></a></li>
        </#list>
    </@_templateList>
</#macro>
<div class="pageContent">
    <div layoutH class="leftPageContent">
        <h2 class="contentTitle">
            <a class="button" href="placeTemplate/metadata.html" target="ajax" rel="cmsTemplatePlace"><@t.page 'place.create'/></a>
        </h2>
        <ul class="tree treeFolder">
            <@placeTree/>
        </ul>
    </div>
    <div id="cmsTemplatePlace" class="unitBox rightPageContent">
        
    </div>
</div>